<!DOCTYPE HTML>
<html>
<body>
<script>

var tt = 'aa';
function test(){
alert(tt);
//var tt = 'dd';
alert(tt);
}
//test(); 

(function(u){
    var a ;
    if(a === u){
        alert(1)
    }
})();

</script>

</body>
</html>